<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>高度塌陷问题</title>
    <style>
        .outer{
            border: 10px red solid ;
            /* float: left; */
            overflow: hidden;
        }
        .inner{
            height: 100px;
            width: 100px;
            background-color: orange;
            float: left;
        }
    </style>
</head>
<body>
    <div class="outer">
        <div class="inner"></div>
    </div>
    <div class="box1" style="height: 200px;width: 200px;background-color: yellow;"></div>
</body>
</html>